package com.example.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel("用户订单")
public class Order {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("订单编号")
    private String orderNumber;

    @ApiModelProperty("详细信息")
    private String details;

    @ApiModelProperty("订单金额(单位：分)")
    private Integer orderAmount;

    @ApiModelProperty("订单状态(1.待支付2.支付成功()3.用户取消4.退款成功)")
    private Integer orderStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("过期时间")
    private Date outTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("支付成功时间")
    private Date payTime;

    @ApiModelProperty("支付用户的openid")
    @TableField(exist = false)
    private String openId;



}

